\section{Web site application}
\subsection{Unit tests}

\subsubsection{Login}
\begin{itemize}
\item \textbf{Input} $\rightarrow$ The nick and password had been introduced.
\item \textbf{Output} $\rightarrow$ The user has been logged in.
\item \textbf{Conditions} $\rightarrow$ The user must have already created an account.
\end{itemize}

\begin{itemize}
\item \textbf{Input} $\rightarrow$ The nick and password had been introduced.
\item \textbf{Output} $\rightarrow$ The system displays a message stating that the combination of the nick and password is invalid.
\item \textbf{Conditions} $\rightarrow$ The combination of nick and password have not been registered in the system.
\end{itemize}

\begin{itemize}
\item \textbf{Input} $\rightarrow$ The nick and password had been introduced.
\item \textbf{Output} $\rightarrow$ The system displays a message stating that there were not filled both nick and password.
\item \textbf{Conditions} $\rightarrow$ The nick or password field is empty.
\end{itemize}


\subsubsection{Create new account}
\begin{itemize}
\item \textbf{Input} $\rightarrow$ All fields had been introduced.
\item \textbf{Output} $\rightarrow$ The system displays a message stating that the new user account has been created.
\item \textbf{Conditions} $\rightarrow$ All the fields had been filled correctly. The user and password fields have more than 
2 and 3 characters, respectively. Moreover, the nick does not exist in the system.
\end{itemize}

\begin{itemize}
\item \textbf{Input} $\rightarrow$ All fields had been introduced.
\item \textbf{Output} $\rightarrow$ The system displays a message stating that the user already exits.
\item \textbf{Conditions} $\rightarrow$ The introduced nick already exists in the system.
\end{itemize}

\begin{itemize}
\item \textbf{Input} $\rightarrow$ Nick or password had not been filled or their length was less that required.
\item \textbf{Output} $\rightarrow$ The system displayed a message informing about it.
\item \textbf{Conditions} $\rightarrow$ One of the fields was not filled or did not have the required length.
\end{itemize}


\subsubsection{Show last position}
\begin{itemize}
\item \textbf{Input} $\rightarrow$ It has been selected the action to show friends last position.
\item \textbf{Output} $\rightarrow$ The system displays a map with the friends last position, represented as red markers.
\item \textbf{Conditions} $\rightarrow$ The user must have already an account in the system and he must have friends and they 
			have at least one position.
\end{itemize}

\begin{itemize}
\item \textbf{Input} $\rightarrow$ It has been selected the action to show friends last position.
\item \textbf{Output} $\rightarrow$ The system displays a map without any markers.
\item \textbf{Conditions} $\rightarrow$ The user must have already an account in the system, but he does not have any friends or
			    his friends do not have any positions yet.
\end{itemize}

\begin{itemize}
\item \textbf{Input} $\rightarrow$ It has been selected the action to show users last position.
\item \textbf{Output} $\rightarrow$ The system displays a map with the users last position, represented as red markers.
\item \textbf{Conditions} $\rightarrow$ The user must have already an account as administrator in the system and there must 
                        have been users already use the system and have at least one position.
\end{itemize}

\begin{itemize}
\item \textbf{Input} $\rightarrow$ It has been selected the action to show users last position.
\item \textbf{Output} $\rightarrow$ The system displays a map without any markers.
\item \textbf{Conditions} $\rightarrow$ The user must already have an account as administrator in the system, but there are not 
			any users in the system or they do not have any position yet.
\end{itemize}


\subsubsection{Show all friends/users}
\begin{itemize}
\item \textbf{Input} $\rightarrow$ It has been selected the action to show all the friends/users.
\item \textbf{Output} $\rightarrow$ The system displays a table with all the friends/users.
\item \textbf{Conditions} $\rightarrow$ The user must already have an account in the system. The user must also have friends, 
		      or users that use the system, if he is an administrator.
\end{itemize}

\begin{itemize}
\item \textbf{Input} $\rightarrow$ It has been selected the action to show all the friends/users.
\item \textbf{Output} $\rightarrow$ The system displays a text message that there are no friends/users.
\item \textbf{Conditions} $\rightarrow$ The user must already have an account in the system. The user does not have any 
                     friends, or there are no users that use the system, if he is an administrator.
\end{itemize}


\subsubsection{Search users}
\begin{itemize}
\item \textbf{Input} $\rightarrow$ It has been introduced the form so as to search users.
\item \textbf{Output} $\rightarrow$ The system displays a table with the results.
\item \textbf{Conditions} $\rightarrow$ The user must already have an account in the system as an administartor. The information 
			    filled in the form match with some users.
\end{itemize}

\begin{itemize}
\item \textbf{Input} $\rightarrow$ It has been introduced the form so as to search users.
\item \textbf{Output} $\rightarrow$ The system displays a text message writing that there were no user with the given information.
\item \textbf{Conditions} $\rightarrow$ The user must already have an account in the system as an administrator. The information 
                            do not match with any user, who is not administrator, in the system.
\end{itemize}


\subsubsection{Show friend/user account information}
\begin{itemize}
\item \textbf{Input} $\rightarrow$ It has been pressed the action to show a selected friend's/ user's account.
\item \textbf{Output} $\rightarrow$ The system displays a table with his account information.
\item \textbf{Conditions} $\rightarrow$ The user must already have an account in the system. 
\end{itemize}


\subsubsection{Show friend/user history of positions}
\begin{itemize}
\item \textbf{Input} $\rightarrow$ It has been pressed the action to show a selected friend's/ user's history of positions.
\item \textbf{Output} $\rightarrow$ The system displays a map with the friend's/user's history of previous positions, shown by 
			red markers.
\item \textbf{Conditions} $\rightarrow$ The user must already have an account in the system. The selected friend/user must 
                        already have at least one previous position.
\end{itemize}

\begin{itemize}
\item \textbf{Input} $\rightarrow$ It has been pressed the action to show a selected friend's/ user's history of positions.
\item \textbf{Output} $\rightarrow$ The system displays an map without any makers.
\item \textbf{Conditions} $\rightarrow$ The user must already have an account in the system. The selected friend/user does not 
                        have previous positions.
\end{itemize}


\subsubsection{Delete user}
\begin{itemize}
\item \textbf{Input} $\rightarrow$ It has been pressed the action to delete a selected user.
\item \textbf{Output} $\rightarrow$ The system displays a message that the user has been deleted succesfully.
\item \textbf{Conditions} $\rightarrow$ The user must already have an account in the system as an administrator.
\end{itemize}


\subsubsection{Change account information}
\begin{itemize}
\item \textbf{Input} $\rightarrow$ All fields had been introduced.
\item \textbf{Output} $\rightarrow$ The system displays a message stating that the user's information has been updated 
			successfully.
\item \textbf{Conditions} $\rightarrow$ The user must already have an account in the system. The password must have more 
			than 3 characters.
\end{itemize}

\begin{itemize}
\item \textbf{Input} $\rightarrow$ All fields had been introduced.
\item \textbf{Output} $\rightarrow$ The system displays a message informing that the password field is invalid. 
\item \textbf{Conditions} $\rightarrow$ The user must already have an account in the system. The password field has not been
			filled or it is with less than 3 charcters.
\end{itemize}


\subsection{Integration tests}
\begin{enumerate}
\item The application starts.
\item The \emph{Login and create new account} interface starts.
\item Is possible to introduce values in the fields in \emph{create new account} form.
\item Is not possible to show the password characters in \emph{create new account} form.
\item Is not possible to see the password characters in \emph{Login} form.
\item Is not possible to create new account with an existing nick.
\item If you press \emph{Login} in the \emph{Login and create new account} interface, the \emph{Home Page} interface starts.
\item If you press \emph{Sign up} in \emph{Login and create new account} interface the new user account has been stored in the 
      system and the and the new user logs in the \emph{Home Page} interface.

\item If you press the link \emph{Friends/Users Last Position} a map with the friends/users last position will be displayed.

\item If you press the link \emph{Show all Friends/Users} a table will be shown with all friends/users.
\item Is possible to press the \emph{Next} button, in \emph{Show all Friends/Users} interface, if there are not shown in one 
      page all the friends/users because they are more than a specific number.
\item Is possible to press the \emph{Previous} button, in \emph{Show all Friends/Users} interface, if you have already pressed 
      the next button.

\item If you press the link \emph{Search user} a form will be shown with fields nick, name, surname, country.
\item Is possible to introduce values in the fields in \emph{Search user} interface.
\item If you press the \emph{Submit search} button it will be shown the interface \emph{Searched users table}, which shows a 
      table with the searched users.

\item If you press the \emph{Info} button in \emph{Search users table} or in \emph{Show all Friends/Users} interfaces then the 
      user's/friend's account information are going to be shown in a table.  
\item If you press the \emph{History} button in \emph{Search users table} or in \emph{Show all Friends/Users} interfaces then the 
      user's/friend's history of previous positions are going to be displayed in a map.
\item If you press the \emph{Delete} button in \emph{Search users table} interface the selected user account is going to be 
      deleted from the system, and the system will display a message that the deletion was successful.

\item If you press the link \emph{Show/Change account} a table with you account information is going to be displayed.
\item Is possible to change your account information except from the nick.
\item The password, if you want to change it, must be more than 3 characters.
\item The password field is going to show black dots instead of the characters you put.
\item If you press the button \emph{Submit} the changes, if are made, are going to be stored in the system's database and you are 
      going to be informed by a message that submit was successful.
\item If you press the button \emph{Back} the changes, if are made, are not going to be submitted and the system will redirect you 
      to the \emph{Home Page} interface.
\item If you press the link \emph{Create new Admin} a form is going to be shown where you can introduce the new administrator's 
      account information.
\item Is possible to introduce values in the fields in \emph{create new admin} form.
\item Is not possible to show the password characters in \emph{create new admin} form.
\item Is not possible to create new administrator with an existing nick.
\item If you press the \emph{Create admin} button the new administrator's account is going to be stored in the system and it will 
      show a message that the creation of the new administrator's account was successful.
\item If you press the \emph{logout} button you are going to exit from the Web site application.
\end{enumerate}